-- GENERATED SPELL FOR [Drakkari Earthshaker] --


function spell0_29829(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(16172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29829', 20336, 1)
end

function spell1_29829(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(58969,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29829', 20279, 1)
end

function spell2_29829(pUnit, Event) --@Powerful Blow,n/a--
pUnit:FullCastSpellOnTarget(55567,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29829', 539, 1)
end

function spell3_29829(pUnit, Event) --@Slam Ground,Self--
pUnit:FullCastSpellOnTarget(55563,pUnit)
pUnit:RegisterEvent('Sorts_29829', 656, 1)
end

function Sorts_29829(pUnit, Event)
local choix_sorts_29829 = math.random(0, 3)
if choix_sorts_29829 == 0 then
pUnit:RegisterEvent('spell0_29829', 1, 1)
end
if choix_sorts_29829 == 1 then
pUnit:RegisterEvent('spell1_29829', 1, 1)
end
if choix_sorts_29829 == 2 then
pUnit:RegisterEvent('spell2_29829', 1, 1)
end
if choix_sorts_29829 == 3 then
pUnit:RegisterEvent('spell3_29829', 1, 1)
end
end

function mob29829_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29829', math.random(1500, 3000), 1)
end

function mob29829_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29829_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29829_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29829, 1, 'mob29829_Action')
RegisterUnitEvent(29829, 2, 'mob29829_Leave')
RegisterUnitEvent(29829, 3, 'mob29829_Kill')
RegisterUnitEvent(29829, 4, 'mob29829_Die')
